function initbody(){
	xcy.init();
}

var xcy = {
	init:function(){
		this.resiezess();
		this.touchobj = $('#mainbody').rockdoupull({
			downbool:true,scrollbool:false,
			ondownsuccess:function(){
				xcy.reload('none');
			},
			ondownbefore:function(){
				return xcy.index==0;
			}
		});
		this.reload();
	},
	index:0,
	otherheight:65,
	getheight:function(ss){
		if(!ss)ss=0;
		var hei = this.otherheight+$('#searchBar').height();
		if(get('header'))hei+=50;
		return winHb()-hei+ss;
	},
	resiezess:function(){
		var hei = xcy.getheight();
		$('#mainbody').css('height',''+hei+'px');
		viewheight = hei;
	},
	reload:function(bo){
		js.ajax({
			url:'api.php?m=index&a=data',
			success:function(ret){
				
				xcy.loadshow(ret.data);
			},
			dataType:'json'
		});
	},
	loadshow:function(da){
		this.touchobj.ondownok();
		this.shownewfile(da.newfile);
	},
	shownewfile:function(da){
		
	}
}